An XML file begins with an XML declaration, containing the XML version and the encoding information. For example,
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-16" ?>
If you create an XML document in Notepad, the file can be saved in UTF-8 or UTF-16 file format. If no declaration appears, UTF-8 format is assumed. If you save the file in Notepad with Encoding=Unicode, be sure the declaration at the top of the XML file specifies encoding="UTF-16".
Tip: |
Notepad's Unicode file type corresponds to UTF-16 file format. |
For files containing strings in English or other Latin-based languages, UTF-8 is recommended to reduce the size of the XML file. For other languages, such as Chinese, Japanese, or Korean, UTF-16 is recommended.
You must specifically save as the desired encoding in Notepad. The default is to save to ANSI, and that format will not import properly.
About XML (Extensible Markup Language)